﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SPGenesis.Core;
using Microsoft.SharePoint;

namespace Akrad.Portal.Core.Entitys.MContents.Category
{
    [SPGENListInstance(Description = "Chuyên mục tin(Kênh tin)",
        Title = "Kênh tin", OnQuickLaunch=false ,WebRelURL = "Lists/Kenhtin", TemplateType = (int)SPListTemplateType.GenericList)]
    public partial class CategoryIntances : SPGENListInstance<CategoryIntances>
    {
        protected override void InitializeDefinition(SPGENListInstanceProperties properties)
        {
            properties.Fields.ProvisioningMode = SPGENProvisioningMode.ExclusiveAdd;
            properties.Fields.Add<ParentId>(true, false);
            properties.Fields.Add<OrderId>(true, false);
            properties.Fields.Add<SiteId>(true, false);
            properties.Fields.Add<NumberNews>(true, false);
            properties.Fields.Add<Statust>(true, false);
        }

        [SPGENField(AllowMultipleValues = false, ID = "{6B439E13-FFC3-41DD-A011-98900D3DFE4A}", DisplayName = "Kênh cha", Type = SPFieldType.Number, Required = false)]
        public class ParentId : SPGENField<ParentId, SPFieldNumber, int>
        {

        }

        [SPGENField(AllowMultipleValues = false, ID = "{01519ED9-8CF4-4B1A-B0ED-BE7EF8BD1A37}", DisplayName = "Thứ tự hiển thị", Type = SPFieldType.Number, Required = false)]
        public class OrderId : SPGENField<OrderId, SPFieldNumber, int>
        {
        }


        [SPGENField(AllowMultipleValues = false, ID = "{89D81752-6862-4B8F-BE16-7FE33A484CFE}", DisplayName = "Site Id", Type = SPFieldType.Guid, Required = false)]
        public class SiteId : SPGENField<SiteId, SPFieldGuid, string>
        {
        }

        [SPGENField(AllowMultipleValues = false, ID = "{6D4833E2-B679-4BB5-A2E1-E8DFFE340D65}", DisplayName = "Số lượng tin", Type = SPFieldType.Number, Required = false)]
        public class NumberNews : SPGENField<NumberNews, SPFieldNumber, int>
        {
        }

        [SPGENField(AllowMultipleValues = false, ID = "{4D85C127-55FF-4598-9C77-40F107F8DA6E}", DisplayName = "Trạng thái", Type = SPFieldType.Boolean, Required = false)]
        public class Statust : SPGENField<Statust, SPFieldBoolean, bool>
        {
        }

    }
}